<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>试用首页 - {$Config.sitename}</title>
    <link rel="stylesheet" href="__CSS__/global.css" />
    <link rel="stylesheet" href="__CSS__/index.css" />
    <link rel="stylesheet" href="__CSS__/shiyong.css" />
    <Admintemplate file="Home/Public/global_js"/>
    <script src="__JS__/jquery.min.js"></script>
</head>

<body>

<div class="b-page">
<div class="b-slideBar" style="top:125px;">
    <div class="b-slideBar__top"><img class="pic_mid" src="__IMAGES__/icon_slide_bar_menu.png"><span>试用分类</span></div>
    <div class="b-slideBar__fenlei">
        <div class="b-slideBar__list" style="display:block;">
            <foreach name="cate" item="ct">
                <a href="__WEBURL__/try/newtry?cat={$ct.cateid}" class="b-slideBar__item"><img class="pic_mid" src="__FILESURL__{$ct.image}" width="40" height="25"><span>{$ct.catename}</span></a>
            </foreach>
        </div>
    </div>

</div>
<include file="Public:tryheader"/>
<if condition="$tjtry">
<div class="b-banner" style="background-image:url('__FILESURL__{$midad.image}');">
    <div class="b-banner__main l-center">
        <div class="b-banner__bTitle">{$tjtry.title}</div>
        <div class="b-banner__bTags">
            <div class="b-banner__bTag">
                <i class="b-banner__bTagBgLeft"></i>
                <span class="b-banner__bTagBody">{$tjtry.requestnum}人申请</span>
                <i class="b-banner__bTagBgRight"></i>
            </div>
            <div class="b-banner__bTag">
                <i class="b-banner__bTagBgLeft"></i>
                <span class="b-banner__bTagBody">￥{$tjtry.price}元</span>
                <i class="b-banner__bTagBgRight"></i>
            </div>
            <div class="b-banner__bTag">
                <i class="b-banner__bTagBgLeft"></i>
                <span class="b-banner__bTagBody">{$tjtry.trynum}份</span>
                <i class="b-banner__bTagBgRight"></i>
            </div>
        </div>
        <div class="b-banner__time">时间剩余：{$tjtry.end_time|stime}</div>
        <a href="__WEBURL__/try/detail/{$tjtry.tryid}.html" class="b-banner__btn"></a>
    </div>
</div>
</if>

<div class="b-scroll">
    <div class="b-scroll__body">
        <div class="b-shiyongTitle"><span>热门试用</span><span style="font-size:16px;color:#999;float:none;font-weight:normal;margin-left:10px;">每周热门产品推荐试用</span></div>
        <i class="b-scroll__prev"></i>
        <i class="b-scroll__next"></i>
        <div class="b-scroll__main">
            <div class="b-scroll__list">
                <foreach name="hottry" item="ht">
                    <a href="__WEBURL__/try/detail/{$ht.tryid}.html" class="b-scroll__item">
                        <div class="b-shiyongItem__pic"><img src="__FILESURL__{$ht.image}" alt="" ></div>
                        <div class="b-scroll__title">{$ht.title}</div>
                        <div class="b-scroll__tags">
                            <div class="b-scroll__tag">￥{$ht.price}</div>
                            <div class="b-scroll__tag">{$ht.trynum}份</div>
                        </div>
                        <div class="b-scroll__shenqing">
                            <b>{$ht.requestnum}</b>
                            <span>人申请</span>
                        </div>
                        <div class="b-scroll__status">剩余时间：{$ht.end_time|stime}</div>
                    </a>
                </foreach>
            </div>
        </div>
    </div>
</div>

<div class="b-body l-center l-mgt20" style="padding-bottom:0;width:936px;">

    <div class="b-shiyongTitle"><span>近期试用</span><a href="__WEBURL__/try/newtry" class="b-shiyongMore">查看更多</a></div>

    <div class="b-shiyongList" id="jinqi">
        <foreach name="newesttry" item="nt">
        <a href="__WEBURL__/try/detail/{$nt.tryid}.html" class="b-shiyongItem">
            <div class="b-shiyongItem__pic"><img src="__FILESURL__{$nt.image}"></div>
            <div class="b-shiyongItem__text">
                <p>{$nt.title}</p>
            </div>
        </a>
        </foreach>

    </div>

</div>

<div style="background-color:#f0f0f0;">
    <div class="b-body l-center" style="width:936px;">

        <div class="b-shiyongTitle"><span>试用报告</span><a href="__WEBURL__/try/report" class="b-shiyongMore">查看更多</a></div>

        <div class="b-shiyongList" id="baogao">
            <foreach name="tryreport" item="tr">
            <a href="__WEBURL__/try/reportdetail/{$tr.id}.html" class="b-shiyongItem">
                <div class="b-shiyongItem__pic"><img src="__FILESURL__{$tr.image}" /></div>
                <div class="b-shiyongItem__text">
                    <p>{$tr.tryid|getTryItemName}</p>
                </div>
            </a>
            </foreach>
        </div>

    </div>
</div>

<include file="Public:footer"/>
</div>

<script>
    $(document).ready(function(){
        var scrollIndex=0,scrollLength=$('.b-scroll__item').length;
        $('#baogao>.b-shiyongItem').each(function(i,val){
            if(i%3==2) $(this).addClass('last');
        });
        $('#jinqi>.b-shiyongItem').each(function(i,val){
            if(i%3==2) $(this).addClass('last');
        });
        $('.b-scroll__next').on('click',function(){
            scrollIndex++;
            if(scrollIndex>scrollLength-3) scrollIndex=scrollLength-3;
            $('.b-scroll__list').stop(true,true).animate({left:-322*(scrollIndex)+'px'},400);
        });
        $('.b-scroll__prev').on('click',function(){
            scrollIndex--;
            if(scrollIndex<0) scrollIndex=0;
            $('.b-scroll__list').stop(true,true).animate({left:-322*(scrollIndex)+'px'},400);
        });
    });
</script>

<script src="__JS__/index.js"></script>

</body>
</html>